package com.way.controller;

import com.way.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class OrderController {

    @Autowired
    private IOrderService orderService;

    @GetMapping("/order/{orderId}")
    public Map<String,Object> getOrder(@PathVariable("orderId") Integer orderId) {
        return orderService.getOrder(orderId);
    }
}
